import React from "react";
import style from "./index.module.scss";
import Icon from "@/components/Icon";
type Props = {
  onCommentPopup?: () => void;
  onCollected: () => void;
  attitude?: number;
  onLike?: () => void;
  type: string;
};
function CommentFooter({
  onCommentPopup,
  onCollected,
  onLike,
  attitude,
  type,
}: Props) {
  return (
    <div className={style.root} onClick={onCommentPopup}>
      <div onClick={onCommentPopup}>
        {type === "normal" && (
          <>
            <div className="action-item" onClick={onLike}>
              <Icon
                type={attitude === 1 ? "iconbtn_like_sel" : "iconbtn_like2"}
              />
            </div>
          </>
        )}
        {type === "reply" && (
          <div className="action-item" onClick={onLike}>
            <Icon
              type={attitude === 1 ? "iconbtn_like_sel" : "iconbtn_like2"}
            />
          </div>
        )}
      </div>
    </div>
  );
}

export default CommentFooter;
